package com.songlanyun.modules.account.model.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.songlanyun.common.drive.RootEntity;
import com.songlanyun.common.drive.ValueObject;
import com.songlanyun.common.validator.group.AddGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import com.songlanyun.modules.account.entity.AccountEntity;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 会员在第三方平台中的身份（如果在小程序中的openid）
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-04 10:36:59
 */
@Data
public class UserThirdIdentityDTO implements ValueObject, Serializable {

    /**
     * 第三方身份（微信小程序0，支付宝小程序1）
     */
    @NotNull(message = "第三方身份类型不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Range(min = 0, max = 1, message = "第三方身份类型传值有误", groups = {AddGroup.class, UpdateGroup.class})
    private Integer thirdType;

    @NotBlank(message = "code不能为空", groups = {AddGroup.class})
    private String code;
}
